//
//  SettingCell.m
//  SuperRadio
//
//  Created by GYRu on 14-12-19.
//  Copyright (c) 2014年 三个臭皮匠. All rights reserved.
//

#import "SettingCell.h"


@implementation SettingCell

// 初始化属性
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
//        UIView *cellView = [[UIView alloc] initWithFrame:self.contentView.frame];
//        cellView.backgroundColor = [UIColor redColor];
        
        
        self.setImageView = [[UIImageView alloc] init];
//        self.setImageView.backgroundColor = [UIColor redColor];
        [self.contentView addSubview:self.setImageView];
        [_setImageView release];
        
        self.titleLabel = [[UILabel alloc] init];
        [self.contentView addSubview:self.titleLabel];
        [_titleLabel release];
        
        self.numLabel = [[UILabel alloc] init];
        [self.contentView addSubview:self.numLabel];
        [_numLabel release];
        
    }
    return self;
}



-(void)layoutSubviews
{
    [super layoutSubviews];
    
    NSInteger width = self.contentView.bounds.size.width / 10;
    NSInteger height = self.contentView.bounds.size.height - 10;
    // 设置位置 大小
    _setImageView.frame = CGRectMake(23, 13, width / 2, width / 2);
    _titleLabel.frame = CGRectMake(width + 10, 5, width * 7, height);
    _numLabel.frame = CGRectMake(width + width * 7, 5, width * 2, height);
    
}







- (void)dealloc
{
    [_setImageView release];
    [_titleLabel release];
    [_numLabel release];
    
    [super dealloc];
}



@end
